package com.yuan.system.api.factory;

import com.yuan.system.api.client.TaskClient;
import lombok.RequiredArgsConstructor;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;


@Component
@RequiredArgsConstructor
public class TaskFallbackFactory implements FallbackFactory<TaskClient> {

    @Override
    public TaskClient create(Throwable cause) {
        return () -> "降级成功";
    }
}
